<div class="col-md-12">--}%
    <!DOCTYPE html>
    <html>

    <head>
        <meta name="layout" content="main2" />
        <g:set var="entityName" value="${message(code: 'asset.label', default: 'Company')}" />
        <title>资产</title>
    </head>

    <body>
        <div class="main-body">
            <div class="page-wrapper">
                <div class="page-header">
                    <div class="page-header-title">
                        <h4>所有资产</h4>
                    </div>

                    <div class="page-header-breadcrumb">
                        <ul class="breadcrumb-title">
                            <li class="breadcrumb-item">
                                <a href="/salesDashboard/index">
                                    <i class="icofont icofont-home"></i>
                                </a>
                            </li>
                            <li class="breadcrumb-item"><a href="#!">所有资产</a>
                            </li>
                        </ul>
                    </div>
                </div>
                <div class="page-body">
                    <div class="card">
                        <div class="card-header">
                            <h5>所有资产</h5>
                            <div class="card-header-right">
                                <g:link action="create"><i class="ion-plus"></i> 新增</g:link>
                            </div>
                        </div>
                        <div class="card-block dt-responsive">
                            <div class="table-responsive">
                                <div id="dom-jqry_wrapper" class="dataTables_wrapper dt-bootstrap4">

                                    <g:form method="POST" action="searchAsset">
                                        <div class="row m-0">
                                            <div class="col-md-8 p-l-0">
                                                <div id="order-table_filter" class="dataTables_filter text-left">
                                                    <label>搜索
                                                        <input type="text" class="form-control" placeholder="序列号" name="code" id="code" value="${params?.code}">
                                                        <input type="text" class="form-control" placeholder="资产名称" name="name" id="name" value="${params?.name}">
                                                    </label>
                                                </div>
                                            </div>
                                            <div class="col-md-4 p-r-0 dt-buttons text-right">
                                                <button class="btn btn-inverse btn-sm btn-squeare" type="submit"><i class="fa fa-search"></i></button>
                                                <button class="btn btn-inverse btn-sm btn-squeare" type="button" id="resetBtn"><i class="fa fa-refresh"></i></button>
                                            </div>
                                        </div>
                                    </g:form>

                                    <table class="table table-striped  table-bordered table-hover">
                                        <thead>
                                            <tr>
                                                <g:sortableColumn property="code" title="序列号" />
                                                <g:sortableColumn property="name" title="资产名称" />
                                                <g:sortableColumn property="competitorAsset" title="竞争对手的设备" />
                                                <g:sortableColumn property="product" title="产品" />
                                                <g:sortableColumn property="account" title="客户" />
                                                <g:sortableColumn property="contact" title="联系人" />
                                                <g:sortableColumn property="quantity" title="数量" />
                                                <g:sortableColumn property="purchaseDate" title="采购时间" />
                                                <g:sortableColumn property="installDate" title="安装时间" />
                                                <g:sortableColumn property="usageEndDate" title="停用时间" />
                                                <g:sortableColumn property="description" title="描述" />
                                            </tr>
                                        </thead>
                                        <tbody>
                                            <g:each in="${assetList}">
                                                <tr>
                                                    <td>
                                                        <g:link action="show" id="${it.id}" class="firstTd">${it?.code}</g:link>
                                                    </td>
                                                    <td>${it?.name}</td>
                                                    <td>${it?.competitorAsset}</td>
                                                    <td>${it?.product}</td>
                                                    <td>${it?.account}</td>
                                                    <td>${it?.contact}</td>
                                                    <td>${it?.quantity}</td>
                                                    <td>
                                                        <g:formatDate date="${it?.purchaseDate}" format="yyyy-MM-dd HH:mm:ss"></g:formatDate>
                                                    </td>
                                                    <td>
                                                        <g:formatDate date="${it?.installDate}" format="yyyy-MM-dd HH:mm:ss"></g:formatDate>
                                                    </td>
                                                    <td>
                                                        <g:formatDate date="${it?.usageEndDate}" format="yyyy-MM-dd HH:mm:ss"></g:formatDate>
                                                    </td>
                                                    <td>${it?.description}</td>
                                                </tr>
                                            </g:each>
                                        </tbody>
                                    </table>

                                    <div class="dataTables_paginate">
                                        <div class="pagination">
                                            <g:paginate total="${assetCount ?: 0}" params="${params}" />

                                        </div>
                                    </div>

                                </div>

                            </div>

                        </div>
                    </div>
                    <!-- Hover table card end -->
                </div>

                <!-- Page-body end -->
            </div>
        </div>

        <g:javascript>
            $(function() {
                $("#resetBtn").click(function() {
                    $("#code").val("");
                    $("#name").val("");
                })
            });
        </g:javascript>
    </body>

    </html>
